//
//  NSDictionary+Extensions.h
//  CantripSDK
//
//  Created by James Callender on Sun Apr 27 2003.
//  Copyright (c) 2003 James Callender. All rights reserved.
//

#import <Foundation/Foundation.h>


@interface NSDictionary (CantripExtensions)

// Thanks to the OmniGroup for the following (float|double|bool|int)forKey methods
// ObjC doesn't return 0.0 if you send a message returning float or double to a nil
- (float)floatForKey:(NSString *)key defaultValue:(float)defaultValue;
- (float)floatForKey:(NSString *)key;
- (double)doubleForKey:(NSString *)key defaultValue:(double)defaultValue;
- (double)doubleForKey:(NSString *)key;

// Returns YES iff the value is YES, Y, yes, y, or 1.
- (BOOL)boolForKey:(NSString *)key defaultValue:(BOOL)defaultValue;
- (BOOL)boolForKey:(NSString *)key;

// Just to make life easier
- (int)intForKey:(NSString *)key defaultValue:(int)defaultValue;
- (int)intForKey:(NSString *)key;

@end
